package com.snail.utils;


import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.json.JSONUtil;
import com.snail.model.vo.user.LoginUser;

/**
 * @author Monica
 * @description
 * @date 2025/8/14 19:06
 */
public class SecurityUtils {

    /**
     * 获取当前登录用户信息
     */
    public static LoginUser getCurrentUser() {
        String loginIdAsString = StpUtil.getLoginIdAsString();
        return JSONUtil.toBean(loginIdAsString, LoginUser.class);
    }
}
